package com.ap.generator.common;

import com.ap.core.cxf.jaxb.common.AbstractAddressCountryCodeGeneratorBuilder;
import com.ap.datagen.core.GeneratorHelper;

import static com.ap.datagen.core.Nullable.nullable;
import static com.ap.datagen.lang.StringRandomGeneratorBuilder.stringRandomGeneratorBuilder;

public class AddressCountryCodeGeneratorBuilder extends
		AbstractAddressCountryCodeGeneratorBuilder {

	private static final String[] COUNTRY_CODES = new String[] {"GBR"};
	private static final String[] POST_CODES = new String[]{"RK12", "RK13", "RK14"};
	
	@Override
	public void setupDefaults() {
		this.countryCodeGenerator = nullable(GeneratorHelper.randomGeneratorFromArray(COUNTRY_CODES));
		this.postCodeGenerator = nullable(GeneratorHelper.randomGeneratorFromArray(POST_CODES));
		this.addressLine1Generator = nullable(stringRandomGeneratorBuilder().length(15).build());
		this.addressLine2Generator = nullable(stringRandomGeneratorBuilder().length(15).build());
		this.addressLine3Generator = nullable(stringRandomGeneratorBuilder().length(15).build());
		this.addressLine4Generator = nullable(stringRandomGeneratorBuilder().length(15).build());
		this.addressLine5Generator = nullable(stringRandomGeneratorBuilder().length(15).build());
		this.addressLine6Generator = nullable(stringRandomGeneratorBuilder().length(15).build());
		
	}

	public static AddressCountryCodeGeneratorBuilder getAddressCountryCodeGenerator() {
		return new AddressCountryCodeGeneratorBuilder();
	}
}
